import React from 'react';
import { List } from 'react-virtualized';

// List data as an array of strings
const list = [
  'Brian Vaughn1',
  'Brian Vaughn1',
  'Brian Vaughn1',
];



// 控制一下 循环中标签该如何显示即可  index  循环的索引 
function rowRenderer({
  key, // Unique key within array of rows
  index, // Index of row within collection
  isScrolling, // The List is currently being scrolled
  isVisible, // This row is visible within the List (eg it is not an overscanned row)
  style, // Style object to be applied to row (to position it)
}) {
  console.log(style);
  return (
    <div key={key} style={style}>
      <button onClick={() => console.log(123)} >    {list[index]}</button>
    </div>
  );
}


const HKList = () => <List
  width={200}
  height={100}
  rowCount={list.length}
  rowHeight={50}
  rowRenderer={rowRenderer}
/>

export default HKList;